using zhwy.saas.api.Entity.Sys;

namespace zhwy.saas.api.Services.Sinterface.Sys
{
    /// <summary>
    /// 系统菜单服务接口
    /// </summary>
    public interface ISysMenuService : IBaseService<MenusEntity>
    {
        /// <summary>
        /// 获取菜单树形结构
        /// </summary>
        /// <returns>菜单树</returns>
        Task<List<MenusEntity>> GetMenuTreeAsync();

        /// <summary>
        /// 获取用户的菜单权限
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>用户有权限的菜单列表</returns>
        Task<List<MenusEntity>> GetUserMenusAsync(long userId);

        /// <summary>
        /// 获取角色的菜单权限
        /// </summary>
        /// <param name="roleId">角色ID</param>
        /// <returns>角色有权限的菜单列表</returns>
        Task<List<MenusEntity>> GetRoleMenusAsync(long roleId);

        /// <summary>
        /// 更新菜单状态
        /// </summary>
        /// <param name="menuId">菜单ID</param>
        /// <param name="status">新状态</param>
        /// <returns>是否更新成功</returns>
        Task<bool> UpdateStatusAsync(long menuId, int status);
    }
}